package com.ky.pro.java.rpc.hd.app;

import com.ky.pro.java.rpc.hd.app.service.IExchangeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.context.annotation.Bean;
import springfox.documentation.oas.annotations.EnableOpenApi;

@SpringBootApplication(exclude = MongoAutoConfiguration.class)
@EnableOpenApi
public class ExchangeApplication {

    public static void main(String[] args) {
        SpringApplication.run(ExchangeApplication.class, args);
    }

    @Autowired
    IExchangeService exchangeService;

    @Bean
    public ApplicationRunner runner() {
        return args -> {
            exchangeService.doExchange(1, 2, 1);
        };
    }

}
